var _util = require('util/util.js');

var _catalog_service = {
    getProductList : function(categoryId,resolve,reject){
        _util.request({
            url     : _util.getServerURL('/catalog/categories/'+categoryId+'/products'),
            success : resolve,
            error   : reject
        });
    },
    getItemList : function(productId,resolve,reject){
        _util.request({
            url     : _util.getServerURL('/catalog/categories/products/'+productId+'/items'),
            success : resolve,
            error   : reject
        });
    },
};

module.exports = _catalog_service;